<template>
     <div id="main" style="width: 600px;height:400px;"></div>
</template>
<script>
import * as echarts from 'echarts';
export default {
    name:"chart_list",
    data(){
        return{
            options:{}
        }
    },
    mounted(){
        var myChart = echarts.init(document.getElementById('main'));
        this.$post("api/chart/getChart",{filename:escape("泰州市殡仪馆/火化统计")}).then(data=>{
            this.options=data;
            console.log(JSON.stringify(this.options))
            myChart.setOption(this.options);
        });
        /*myChart.setOption({
            title: {
                text: 'ECharts 入门示例',
                left:"center"
            },
            tooltip: {},
            xAxis: {
                data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'line',
                data: [5, 20, 36, 10, 10, 20]
            }]
        });*/
    }
}
</script>